#include "lcd.h"


static sj_char device_buffer[8][128]={0};

struct rcc_apb_periph lcd_rcc[]=
{
    {
        2,RCC_APB2RSTR_IOPERST_Pos,
    },
    {
        2,RCC_APB2RSTR_IOPCRST_Pos,
    },
    {
        2,RCC_APB2RSTR_IOPDRST_Pos,
    },
    {
        0,0
    }
};

static struct lcd_device_data lcd_device={
    &lcd_rcc[0],
    {
        GPIOE_BASE,8,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        GPIOE_BASE,7,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        GPIOE_BASE,10,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        GPIOE_BASE,11,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        GPIOE_BASE,9,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        GPIOC_BASE,8,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        GPIOD_BASE,7,GPIO_MODE_OUTPUT_PP,GPIO_SPEED_FREQ_HIGH,GPIO_PULLUP
    },
    {
        &device_buffer[0][0],128,8
    }
};

static struct device lcd_12864_device={
    "/dev/fb",
    "12864",
     0,
    NULL,
    (sj_void *)&lcd_device,
};

static DEVICE_MODULE_INIT(lcd_12864_device)
